package com.autumn.mybatis.criterion.clauses;

/**
 * 排序分句
 * 
 * @author 老码农
 *
 *         2017-10-29 12:24:46
 */
public class OrderClause {

	private final String columnName;
	private final String direction;

	/**
	 * 实例化
	 * 
	 * @param columnName
	 *            列名称
	 * @param direction
	 *            方向
	 */
	public OrderClause(String columnName, String direction) {
		this.columnName = columnName;
		this.direction = direction;
	}

	/**
	 * 获取列名称
	 * 
	 * @return
	 */
	public String getColumnName() {
		return columnName;
	}

	/**
	 * 方向
	 * 
	 * @return
	 */
	public String getDirection() {
		return direction;
	}

	@Override
	public String toString() {
		return this.getColumnName() + " " + this.getDirection();
	}

}
